package com.alawn.security.service.impl;

import com.alawn.framework.services.security.Role;
import com.alawn.framework.services.security.User;
import com.alawn.security.mapper.UserMapper;
import com.alawn.security.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 账号表 服务实现类
 * </p>
 *
 * @author johnny
 * @since 2019-02-27
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {


    @Autowired
    private UserMapper userMapper;

    @Override
    public List<Role> findRolesByUserName(String usernamne) {
        return userMapper.userHasRole(usernamne);
    }
}
